package com.example.studentaihouduan.service.Serviceimpl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.studentaihouduan.Mapper.PatientMapper;
import com.example.studentaihouduan.entity.Patient;
import com.example.studentaihouduan.service.PatientService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PatientServiceImpl extends ServiceImpl<PatientMapper, Patient> implements PatientService {

    @Override
    public Patient getPatientById(Integer id) {
        return getById(id);
    }

    @Override
    public List<Patient> getAllPatients() {
        return list();
    }

    @Override
    public void savePatient(Patient patient) {
        save(patient);
    }

    @Override
    public void updatePatient(Patient patient) {
        updateById(patient);
    }

    @Override
    public void deletePatient(Integer id) {
        removeById(id);
    }
}
